package com.qst.beans;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

public class Order {
    private Integer oid;
    private double total;//总费用
    private Date ordertime;
    private int statu;//1 未付款  2 已付款，未发货  3已发货，未收货  4交易完成
    private String address;
    private String name;
    private String phone ;

    private User user;//订单所属用户;
    private Set<OrderItem> orderItemSet = new HashSet<>();//订单下所属的订单项

    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public double getTotal() {
        return total;
    }

    public void setTotal(double total) {
        this.total = total;
    }

    public Date getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(Date ordertime) {
        this.ordertime = ordertime;
    }

    public int getStatu() {
        return statu;
    }

    public void setStatu(int statu) {
        this.statu = statu;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Set<OrderItem> getOrderItemSet() {
        return orderItemSet;
    }

    public void setOrderItemSet(Set<OrderItem> orderItemSet) {
        this.orderItemSet = orderItemSet;
    }

    @Override
    public String toString() {
        return "Order{" +
                "oid=" + oid +
                ", total=" + total +
                ", ordertime=" + ordertime +
                ", statu=" + statu +
                ", address='" + address + '\'' +
                ", name='" + name + '\'' +
                ", phone='" + phone + '\'' +
                ", user=" + user +
                ", orderItemSet=" + orderItemSet +
                '}';
    }
}
